package com.ying.tests.BBBbook.java8.Chapter1;

import java.math.BigDecimal;

/**
 * 交易实体类
 */
public class Transaction {

    private BigDecimal price;
    private Currency currency;

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Currency getCurrency() {
        return currency;
    }

    public void setCurrency(Currency currency) {
        this.currency = currency;
    }

    public Transaction(BigDecimal price, Currency currency) {
        this.price = price;
        this.currency = currency;
    }

    @Override
    public String toString() {
        return "Transaction{" +
                "price=" + price +
                ", currency=" + currency +
                '}';
    }
}
